home *** CD-ROM | disk | FTP | other *** search
/ Deliver Us From Eva Press Kit / Deliver Us From Eva Press Kit.iso / pc / Deliver_Us_From_Eva.dxr / scripts_11_download behavior.ls < prev    next >
Encoding:
Text File  |  2003-01-06  |  3.5 KB  |  81 lines

  1. property photoPath, logoPath, bioPath, layoutPath, ProNotePath, photoExt, logoExt, bioExt, layoutExt, ProNoteExt
  2. global photoDL, logoDL, bioDL, layoutDL, ProNoteDL, saveMode, downloadList
  3.  
  4. on getPropertyDescriptionList
  5.   description = [#photoPath: [#comment: "Path of image source files relative to movie", #default: "Images", #format: #string], #photoExt: [#comment: "Image files extension", #default: ".tif", #range: [".tif", ".psd", ".jpg", ".eps", ".pct"], #format: #string], #logoPath: [#comment: "Path of logo source files relative to movie", #default: "Logos", #format: #string], #logoExt: [#comment: "Logo files extension", #default: ".eps", #range: [".tif", ".psd", ".jpg", ".eps", ".pct", ".ai"], #format: #string], #bioPath: [#comment: "Path of bio source files relative to movie", #default: "Biographies", #format: #string], #bioExt: [#comment: "Bio files extension", #default: ".rtf", #range: [".rtf", ".doc", ".pdf", ".txt"], #format: #string], #layoutPath: [#comment: "Path of layout source files relative to movie", #default: "Layouts", #format: #string], #layoutExt: [#comment: "Layout files extension", #default: ".eps", #range: [".tif", ".psd", ".jpg", ".eps", ".pct", ".ai", ".pdf"], #format: #string], #ProNotePath: [#comment: "Path of ProNote source files relative to movie", #default: "Production Notes", #format: #string], #ProNoteExt: [#comment: "ProNote files extension", #default: ".rtf", #range: [".rtf", ".doc", ".pdf", ".txt"], #format: #string]]
  6.   return description
  7. end
  8.  
  9. on beginSprite me
  10.   photoPath = the moviePath & fixPath(photoPath)
  11.   logoPath = the moviePath & fixPath(logoPath)
  12.   bioPath = the moviePath & fixPath(bioPath)
  13.   layoutPath = the moviePath & fixPath(layoutPath)
  14.   ProNotePath = the moviePath & fixPath(ProNotePath)
  15.   saveMode = 99
  16. end
  17.  
  18. on mouseUp me
  19.   downloadList = []
  20.   totalCount = photoDL.count + logoDL.count + bioDL.count + layoutDL.count + ProNoteDL.count
  21.   if totalCount then
  22.     totalByte = 0
  23.     if photoDL.count then
  24.       i = 1
  25.       repeat while i <= photoDL.count
  26.         endfile = photoDL[i] & photoExt
  27.         thisFile = photoPath & endfile
  28.         thisByte = baFileSize(thisFile)
  29.         totalByte = totalByte + thisByte
  30.         downloadList.append(thisFile)
  31.         i = 1 + i
  32.       end repeat
  33.     end if
  34.     if logoDL.count then
  35.       i = 1
  36.       repeat while i <= logoDL.count
  37.         endfile = logoDL[i] & logoExt
  38.         thisFile = logoPath & endfile
  39.         thisByte = baFileSize(thisFile)
  40.         totalByte = totalByte + thisByte
  41.         downloadList.append(thisFile)
  42.         i = 1 + i
  43.       end repeat
  44.     end if
  45.     if bioDL.count then
  46.       i = 1
  47.       repeat while i <= bioDL.count
  48.         endfile = bioDL[i] & bioExt
  49.         thisFile = bioPath & endfile
  50.         thisByte = baFileSize(thisFile)
  51.         totalByte = totalByte + thisByte
  52.         downloadList.append(thisFile)
  53.         i = 1 + i
  54.       end repeat
  55.     end if
  56.     if layoutDL.count then
  57.       i = 1
  58.       repeat while i <= layoutDL.count
  59.         endfile = layoutDL[i] & layoutExt
  60.         thisFile = layoutPath & endfile
  61.         thisByte = baFileSize(thisFile)
  62.         totalByte = totalByte + thisByte
  63.         downloadList.append(thisFile)
  64.         i = 1 + i
  65.       end repeat
  66.     end if
  67.     if ProNoteDL.count then
  68.       i = 1
  69.       repeat while i <= ProNoteDL.count
  70.         endfile = ProNoteDL[i] & ProNoteExt
  71.         thisFile = ProNotePath & endfile
  72.         thisByte = baFileSize(thisFile)
  73.         totalByte = totalByte + thisByte
  74.         downloadList.append(thisFile)
  75.         i = 1 + i
  76.       end repeat
  77.     end if
  78.     openDLMessage(totalCount, totalByte)
  79.   end if
  80. end
  81.